<ui:composition template="admin_page_template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets">

	<ui:define name="content">
		<h4>Register new user</h4>
		<h:form id="RegistrationForm">
			<h:panelGrid columns="1">
				<h:outputLabel value="name" for="name" />
				<h:inputText id="name" label="name" value="#{userBean.name}"
					required="true" requiredMessage="required" />


				<h:outputLabel value="password" for="password" />
				<h:inputSecret id="password" label="password"
					value="#{userBean.password}" required="true"
					requiredMessage="required" />

				<h:outputLabel value="full name" for="fullname" />
				<h:inputText id="fullname" label="full name"
					value="#{userBean.fullName}" required="true"
					requiredMessage="required" />

				<h:outputLabel value="email" for="email" />
				<h:inputText id="email" label="email" value="#{userBean.email}"
					required="true" requiredMessage="required" />

				<h:outputLabel value="notes" for="notes" />
				<h:inputText id="notes" value="#{userBean.notes}" required="false" />



				<h:panelGrid columns="2">
				<h:commandButton id="registerButton" action="#{userBean.saveUser}"
					value="Register" styleClass="btn btn-primary" />

					<h:commandButton id="Cancel" action="#{userBean.cancel}"
						value="Cancel" styleClass="btn" />

				</h:panelGrid>

			</h:panelGrid>
		</h:form>
	</ui:define>
</ui:composition>
